Optimal. Leaf size=106 \[ \frac {3 x}{2 a}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a d}-\frac {3 \cos (c+d x)}{2 a d}+\frac {3 \cot (c+d x)}{2 a d}-\frac {\cos ^2(c+d x) \cot (c+d x)}{2 a d}-\frac {\cos (c+d x) \cot ^2(c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2918, 2672,
294, 327, 212, 2671, 209} \begin {gather*} -\frac {3 \cos (c+d x)}{2 a d}+\frac {3 \cot (c+d x)}{2 a d}-\frac {\cos ^2(c+d x) \cot (c+d x)}{2 a d}-\frac {\cos (c+d x) \cot ^2(c+d x)}{2 a d}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac {3 x}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 294
Rule 327
Rule 2671
Rule 2672
Rule 2918
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \cot ^3(c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {\int \cos ^2(c+d x) \cot ^2(c+d x) \, dx}{a}+\frac {\int \cos (c+d x) \cot ^3(c+d x) \, dx}{a}\\ &=-\frac {\text {Subst}\left (\int \frac {x^4}{\left (1-x^2\right )^2} \, dx,x,\cos (c+d x)\right )}{a d}+\frac {\text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{a d}\\ &=-\frac {\cos ^2(c+d x) \cot (c+d x)}{2 a d}-\frac {\cos (c+d x) \cot ^2(c+d x)}{2 a d}+\frac {3 \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 a d}+\frac {3 \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 a d}\\ &=-\frac {3 \cos (c+d x)}{2 a d}+\frac {3 \cot (c+d x)}{2 a d}-\frac {\cos ^2(c+d x) \cot (c+d x)}{2 a d}-\frac {\cos (c+d x) \cot ^2(c+d x)}{2 a d}+\frac {3 \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{2 a d}-\frac {3 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 a d}\\ &=\frac {3 x}{2 a}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a d}-\frac {3 \cos (c+d x)}{2 a d}+\frac {3 \cot (c+d x)}{2 a d}-\frac {\cos ^2(c+d x) \cot (c+d x)}{2 a d}-\frac {\cos (c+d x) \cot ^2(c+d x)}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.36, size = 152, normalized size = 1.43 \begin {gather*} -\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^2 \left (-12 c-12 d x+12 \cos (c+d x)-4 \cos (3 (c+d x))-12 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+12 \cos (2 (c+d x)) \left (c+d x+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+12 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-10 \sin (2 (c+d x))+\sin (4 (c+d x))\right )}{64 a d (1+\sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 140, normalized size = 1.32
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {-4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+12 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}\) | \(140\) |
default | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {-4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+12 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}\) | \(140\) |
risch | \(\frac {3 x}{2 a}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 a d}-\frac {{\mathrm e}^{i \left (d x +c \right )}}{2 a d}-\frac {{\mathrm e}^{-i \left (d x +c \right )}}{2 a d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 a d}+\frac {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+2 i {\mathrm e}^{2 i \left (d x +c \right )}-2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a d}\) | \(171\) |
norman | \(\frac {-\frac {1}{8 a d}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}-\frac {3 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {3 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {3 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {9 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {9 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {9 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {9 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {3 x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {3 x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}-\frac {3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}-\frac {5 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}-\frac {21 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {9 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {25 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}-\frac {5 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}\) | \(393\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 261 vs.
\(2 (94) = 188\).
time = 0.52, size = 261, normalized size = 2.46 \begin {gather*} -\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a} - \frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {18 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {17 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - 1}{\frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 126, normalized size = 1.19 \begin {gather*} \frac {6 \, d x \cos \left (d x + c\right )^{2} - 4 \, \cos \left (d x + c\right )^{3} - 6 \, d x + 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) + 6 \, \cos \left (d x + c\right )}{4 \, {\left (a d \cos \left (d x + c\right )^{2} - a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 167, normalized size = 1.58 \begin {gather*} \frac {\frac {12 \, {\left (d x + c\right )}}{a} - \frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} + \frac {6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}^{2} a}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.98, size = 223, normalized size = 2.10 \begin {gather*} \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}-\frac {3\,\mathrm {atan}\left (\frac {9}{9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+9}-\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+9}\right )}{a\,d}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a\,d}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\frac {17\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {1}{2}}{d\,\left (4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________